cat_dog_horse_decision = {
	picture = "gfx/interface/illustrations/decisions/decision_misc.dds"

	desc = cat_dog_horse_decision_desc
	selection_tooltip = cat_dog_horse_decision_tooltip

	ai_check_interval = 120

	cooldown = { years = 5 }

	is_shown = {
		NAND = {
			any_owned_story = { story_type = story_cycle_pet_cat }
			any_owned_story = { story_type = story_cycle_pet_dog }
			OR = {
				has_character_flag = cat_dog_horse_notry
				any_owned_story = { story_type = story_cycle_martial_lifestyle_warhorse }
			}
		}
	}
	
	is_valid = {
		NAND = {
			any_owned_story = { story_type = story_cycle_pet_cat }
			any_owned_story = { story_type = story_cycle_pet_dog }
			OR = {
				has_character_flag = cat_dog_horse_notry
				any_owned_story = { story_type = story_cycle_martial_lifestyle_warhorse }
			}
		}
	}

	is_valid_showing_failures_only = {
		is_available = yes
	}

	effect = {
		random_list = {
			desc = outcome_in_a_few_days
			100 = {
				desc = trait_specific_ongoing.1003.t
				trigger = {
					has_trait = lunatic
					NAND = { #at least a cat or dog missing
						any_owned_story = {
							story_type = story_cycle_pet_cat
						}
						any_owned_story = {
							story_type = story_cycle_pet_dog
						}
					}
				}
				trigger_event = {
					id = trait_specific_ongoing.1003
					days = { 1 5 }
				}
			}
			100 = {
				desc = childhood.2001.t
				trigger = {
					NOT = {
						any_owned_story = {
							story_type = story_cycle_pet_cat
						}
					}
				}
				trigger_event = {
					id = cat_dog_horse.0004
					days = { 1 5 }
				}
			}
			100 = {
				desc = childhood.2003.t
				trigger = {
					NOT = {
						any_owned_story = {
							story_type = story_cycle_pet_dog
						}
					}
				}
				trigger_event = {
					id = cat_dog_horse.0003
					days = { 1 5 }
				}
			}
			100 = {
				desc = martial_chivalry_special.1601.t
				trigger = {
					NOR = {
						any_owned_story = {
							story_type = story_cycle_martial_lifestyle_warhorse
						}
						has_character_flag = had_warhorse_story
					}
				}
				trigger_event = {
					id = cat_dog_horse.0002
					days = { 1 5 }
				}
			}
		}
		add_character_flag = {
			flag = cat_dog_horse
			days = 35
		}
		if = {
			limit = {
				is_ai = no
			}
			trigger_event = {
				id = cat_dog_horse.0001
				days = 30
			}
		}
	}
	
	ai_potential = {
		always = no
	}

	ai_will_do = {
		base = 100
		modifier = {
			factor = 0.5
			any_owned_story = { story_type = story_cycle_pet_cat }
		}
		modifier = {
			factor = 0.5
			any_owned_story = { story_type = story_cycle_pet_dog }
		}
		modifier = {
			factor = 0.5
			any_owned_story = { story_type = story_cycle_martial_lifestyle_warhorse }
		}
		modifier = {
			factor = 0
			has_trait = lazy
		}
		modifier = {
			factor = 0.5
			has_trait = impatient
		}
		modifier = {
			factor = 0.5
			has_trait = irritable
		}
	}
}